package example.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller

@RequestMapping("login")
public class LoginController extends BaseController {
	
	@RequestMapping(method = RequestMethod.GET)
	public String viewLogin() {
		
		return "login";
	}
	
	@RequestMapping(method = RequestMethod.POST)
	public String login(HttpServletRequest request) {
		request.getSession().setAttribute("username", "username");
		return "redirect:/emp";
	}
}
